/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Telas;

import static java.awt.AWTEventMulticaster.add;
import classes.Usuario;
import java.awt.Color;

/**
 *
 * @author Marcello
 */
public class TelaPrincipalAluno extends javax.swing.JFrame {
        public TelaPrincipalAluno() {
        initComponents();
        getContentPane().setBackground(Color.white);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        desktop = new javax.swing.JDesktopPane();
        jLabel1 = new javax.swing.JLabel();
        jButtonHorarios = new javax.swing.JButton();
        jButtonMeuHorario = new javax.swing.JButton();
        jButton5 = new javax.swing.JButton();
        jButtonTrocarUsuario = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        jButtonAtualizar = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        desktop.setForeground(new java.awt.Color(0, 153, 153));

        javax.swing.GroupLayout desktopLayout = new javax.swing.GroupLayout(desktop);
        desktop.setLayout(desktopLayout);
        desktopLayout.setHorizontalGroup(
            desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        desktopLayout.setVerticalGroup(
            desktopLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 502, Short.MAX_VALUE)
        );

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36)); // NOI18N
        jLabel1.setText("BuskAula");

        jButtonHorarios.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/relogio.gif"))); // NOI18N
        jButtonHorarios.setText("Horários");
        jButtonHorarios.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonHorariosActionPerformed(evt);
            }
        });

        jButtonMeuHorario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/home.png"))); // NOI18N
        jButtonMeuHorario.setText("Meu Horário");
        jButtonMeuHorario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonMeuHorarioActionPerformed(evt);
            }
        });

        jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/Exclamacao.png"))); // NOI18N
        jButton5.setText("Sobre");
        jButton5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton5ActionPerformed(evt);
            }
        });

        jButtonTrocarUsuario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/sair.png"))); // NOI18N
        jButtonTrocarUsuario.setText("Log Out");
        jButtonTrocarUsuario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonTrocarUsuarioActionPerformed(evt);
            }
        });

        Usuario usuario = new Usuario();
        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/onlineS.png"))); // NOI18N
        jLabel2.setText("Logado como: "+usuario.getUsuario());

        jButtonAtualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/atualizar.png"))); // NOI18N
        jButtonAtualizar.setText("Atualizar");
        jButtonAtualizar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonAtualizarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(desktop, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(119, 119, 119)
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(173, 173, 173)
                        .addComponent(jButtonAtualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jButtonHorarios, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButtonMeuHorario, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jButtonTrocarUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel2)))
                .addContainerGap(320, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButtonAtualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(40, 40, 40)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButtonHorarios)
                    .addComponent(jButtonMeuHorario)
                    .addComponent(jButtonTrocarUsuario)
                    .addComponent(jButton5)
                    .addComponent(jLabel2))
                .addGap(18, 18, 18)
                .addComponent(desktop))
        );

        setSize(new java.awt.Dimension(1168, 718));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonHorariosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHorariosActionPerformed
         TelaHorarios horario = new TelaHorarios();
         desktop.add(horario);
         horario.setVisible(true);
         horario.setClosable(true);
    }//GEN-LAST:event_jButtonHorariosActionPerformed

    private void jButtonMeuHorarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMeuHorarioActionPerformed
         TelaMeuHorario telaadicionardisciplina = new TelaMeuHorario();
         desktop.add(telaadicionardisciplina);
         telaadicionardisciplina.setVisible(true);
         telaadicionardisciplina.setClosable(true);
    }//GEN-LAST:event_jButtonMeuHorarioActionPerformed

    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
         TelaSobre telasobre = new TelaSobre();
         desktop.add(telasobre);
         telasobre.setVisible(true);
         telasobre.setClosable(true);
    }//GEN-LAST:event_jButton5ActionPerformed

    private void jButtonTrocarUsuarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonTrocarUsuarioActionPerformed
         TelaLogin telalogin = new TelaLogin();
         telalogin.setVisible(true);
         dispose();

    }//GEN-LAST:event_jButtonTrocarUsuarioActionPerformed

    private void jButtonAtualizarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAtualizarActionPerformed
          TelaMeuHorario telaadicionardisciplina = new TelaMeuHorario();
         desktop.add(telaadicionardisciplina);
         telaadicionardisciplina.setVisible(true);
         telaadicionardisciplina.setClosable(true);        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonAtualizarActionPerformed

    /**
     * @param args the command line arguments
     */


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JDesktopPane desktop;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButtonAtualizar;
    private javax.swing.JButton jButtonHorarios;
    private javax.swing.JButton jButtonMeuHorario;
    private javax.swing.JButton jButtonTrocarUsuario;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    // End of variables declaration//GEN-END:variables
}
